@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
}

.ant-menu-dark.ant-menu-horizontal {
  flex: 1;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

.ant-pro-basicLayout-content {
  margin: 0 !important;
}
iframe {
  border: none !important;
}

.ant-pro-page-container {
  margin: 0 !important;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  .ant-menu.ant-menu-dark .ant-menu-item-selected,
  .ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected {
    background-color: #0097e0 !important;
  }

  .ant-menu-sub.ant-menu-inline {
    background: #242636;
  }
  .ant-btn-primary {
    background-color: #0097e0 !important;
    border-color: #0097e0 !important;
    border-radius: 6px;
  }
  .ant-btn-link {
    color: #0097e0 !important;
  }
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

.ant-pro-top-nav-header-main-left {
  #logo {
    & > a {
      display: flex;
    }
  }
}

.ant-pro-global-header {
  background: #232636;
}

.ant-layout-sider-children {
  color: #fff;
  background: #232636;

  .ant-menu {
    .ant-menu-item {
      transition: none;

      a {
        color: white !important;
      }
    }

    li {
      color: white;

      &:active {
        color: white;
        background: none;
      }

      .ant-menu-submenu-title {
        &:active {
          color: white;
          background: none;
        }
      }

      .ant-menu-submenu-arrow {
        color: white;
      }
    }
  }

  .ant-menu-item-selected {
    color: #fff !important;
    background: linear-gradient(90deg, #0096de 0%, #212b3d 100%);
  }

  .ant-pro-sider-collapsed-button {
    display: none !important;
  }
}

.setSpaceing(@i) when (@i =< 40) {
  .pt-@{i} {
    padding-top: 1px * @i !important;
  }

  .pb-@{i} {
    padding-bottom: 1px * @i !important;
  }

  .pl-@{i} {
    padding-left: 1px * @i !important;
  }

  .pr-@{i} {
    padding-right: 1px * @i !important;
  }

  .mt-@{i} {
    margin-top: 1px * @i !important;
  }

  .mb-@{i} {
    margin-bottom: 1px * @i !important;
  }

  .mr-@{i} {
    margin-right: 1px * @i !important;
  }

  .ml-@{i} {
    margin-left: 1px * @i !important;
  }

  .setSpaceing((@i + 5));
}

.setSpaceing(5);

.w-100 {
  width: 100%;
}

.w-200 {
  width: 200px !important;
}

.h-100 {
  height: 100%;
}

.p-0 {
  padding: 0px !important;
}

.m-0 {
  margin: 0px !important;
}

.bg-white {
  background-color: #fff;
}

.ant-btn {
  border-radius: 6px;
}
.ant-input {
  border-radius: 6px;
}
.ant-picker {
  width: 277px;
  border-radius: 6px;
}
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
  border-radius: 6px;
}

.ant-dropdown-menu {
  border-radius: 8px; /* 设置圆角边框 */
}

.ant-col .ant-form-item-label {
  margin-right: 16px;
}

.ant-btn > .anticon + span,
.ant-btn > span + .anticon {
  margin-left: 4px;
}

.must::before {
  display: inline-block;
  margin-right: 4px;
  color: #ff4d4f;
  font-size: 14px;
  font-family: SimSun, sans-serif;
  line-height: 1;
  content: '*';
}
